package com.codegenerate.demo;

import com.codegenerate.demo.config.HttpFilter;
import com.codegenerate.demo.config.HttpInterceptor;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;


@SpringBootApplication
public class DemoApplication extends  WebMvcConfigurerAdapter{
	
	public static void main(String[] args) {
		var  application=SpringApplication.run(DemoApplication.class, args);
	}




	@Override
	public void addInterceptors(InterceptorRegistry registry) {
		registry.addInterceptor(new HttpInterceptor()).addPathPatterns("/**");
	}
}
